package Skill;

import org.Game.Skill;

import android.graphics.Bitmap;

public class Up_AttackSpeed extends Skill {

	public Up_AttackSpeed(Bitmap bitmap) {
		super(bitmap);
		m_StrikingPower = 0.0f;
		m_DefensivePower = 0.0f;
		m_MovementSpeed = 0.0f;
		m_AttackSpeed = 10.0f;
		
		m_UseSkill = false;
		m_UseSustainmentTimeTime = false;
		
		m_SustainmentTime = 5;
		m_CoolingTime = 10;
		m_RemainingTime = 0;
		
		m_Record_value = 0;
	}
	

	public void Update() {
		// TODO Auto-generated method stub
		//GetTime = GetTime/1000;		
		long i_GetTime = System.currentTimeMillis()/1000;
		
		if (m_UseSkill)
		{		
			m_RemainingTime = m_currentCoolingTime - i_GetTime;
			if ( m_RemainingTime < 0 )
				m_RemainingTime = 0;
			
			if ( m_RemainingTime == 0)
				m_UseSkill = false;
		}
		
	}
	
	public void Activate()
	{
		long time = System.currentTimeMillis()/1000;
		m_UseSkill = true;
		m_UseSustainmentTimeTime = true;
		m_currentCoolingTime =  time + m_CoolingTime;
		m_currentSustainmentTime = time + m_SustainmentTime;
	}
	

}